/**
 * IImageFilter.java
 * 
 * @date: 2012-02-08
 * @author: Xiaoyu Guo (MUN# 200982155)
 * This file is part of the course project for COMP 6752, 
 * Application of Computer Graphics. All the file is written
 * by myself.
 */
package mun.cs6752.project.filter.interfaces;

import java.awt.image.BufferedImage;

import mun.cs6752.project.filter.abstractClasses.AbstractImageFilterControl;
import mun.cs6752.project.ui.ImageCanvas;

/**
 * @author Xiaoyu Guo
 *
 */
public interface IImageFilter {
    /** Execute the filter
     * @param srcImage the source image
     * @param param parameter sent to the filter
     * @return the filtered image
     */
    BufferedImage execute(BufferedImage srcImage, IImageFilterParameter param);
    
    /** Gets the Control on which the user can adjust parameters
     * @return
     */
    AbstractImageFilterControl getControl();
    
    /** Gets the name of the filter
     * @return
     */
    String getName();
    
    /** Whether the filter requires overriding the source image viewer
     * @return
     */
    boolean isOverridingSourceImageControl();
    
    /** Whether the filter requires overriding the target image viewer
     * @return
     */
    boolean isOverridingTargetImageControl();
    
    /** Gets the overridden source image control
     * @param srcImage
     * @return
     */
    ImageCanvas getSourceImageControl(BufferedImage srcImage);
    
    /** Gets the overridden target image control
     * @return
     */
    ImageCanvas getTargetImageControl();
}
